@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            
            @if ($errors->any())
                <div class="alert alert-danger">
                    <ul>
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
              @endif

            <div class="card">
                <div class="card-header">添加监听地址</div>

                <div class="card-body">

                    <form action="{{ route('transaction.store') }}" method="post">
                        {{ csrf_field() }}
                      <div class="form-group">
                          <label for="addresses">已监听地址: </label>
                          <div id="addresses">
                              @foreach ($addresses as $address) 
                                <p>{{ $address }}</p>
                              @endforeach
                          </div>
                      </div>
                      <div class="form-group">
                        <label for="exampleInputEmail1">地址: </label>
                        <input type="text" name="address" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="钱包地址">
                      </div>
                      <button type="submit" class="btn btn-primary">自动同步</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
